FROM java:8

EXPOSE 8888

VOLUME /app-logs

ARG JAR_FILE=target/shop-app-1.0-SNAPSHOT.jar

# ADD shop-app-1.0-SNAPSHOT.jar app.jar
# COPY / ADD 指令功能相似，ADD支持url 和 解压文件

COPY ${JAR_FILE} app.jar

RUN sh -c 'touch /app.jar'

ENV JAVA_OPTS=""

ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -jar /app.jar" ]
